package basic.xiazheng.reflect;

/**
 * @创建人 MBY381
 * @创建时间 2022/4/13 13:54
 * @描述 暂无
 */
public class ClassLoaderTest {


    public static void main(String[] args) {
        String a = new String("ABC");
        Class<?> clazz = a.getClass();
        System.out.println(clazz.getClassLoader());

        Class<Test> clazzTest = Test.class;
        System.out.println(clazzTest.getClassLoader());
        System.out.println(clazzTest.getClassLoader().getParent());
        System.out.println(clazzTest.getClassLoader().getParent().getParent());
        Class<String> ab=String.class;
        System.out.println(ab.getClassLoader());
    }

    static class Test {
        public static void print(String name) {
            System.out.println(name);
        }
    }
}
